﻿CREATE TABLE [dbo].[RefundInfo] (
    [Id]          INT             IDENTITY (1, 1) NOT NULL,
    [RefundType]  INT             NULL,
    [PatientId]   NVARCHAR (50)   NULL,
    [CardNo]      NVARCHAR (50)   NULL,
    [Name]        NVARCHAR (50)   NULL,
    [RefundTime]  DATETIME        NULL,
    [SumFee]      DECIMAL (18, 2) NULL,
    [OrderId]     NVARCHAR (50)   NULL,
    [ClinicNo]    NVARCHAR (50)   NULL,
    [CreateTime]  DATETIME        NULL,
    [IsProcessed] INT             CONSTRAINT [DF__RefundInf__IsPro__108B795B] DEFAULT ((0)) NULL,
    [ProcessTime] DATETIME        NULL,
    CONSTRAINT [PK__RefundIn__3214EC070EA330E9] PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'退费类型, 0-退挂号费，1-退处方费(包括药费，检查/检验费)', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'RefundInfo', @level2type = N'COLUMN', @level2name = N'RefundType';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'患者ID，（院内唯一）', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'RefundInfo', @level2type = N'COLUMN', @level2name = N'PatientId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'就诊卡号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'RefundInfo', @level2type = N'COLUMN', @level2name = N'CardNo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'患者姓名', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'RefundInfo', @level2type = N'COLUMN', @level2name = N'Name';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'退费时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'RefundInfo', @level2type = N'COLUMN', @level2name = N'RefundTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'总费用', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'RefundInfo', @level2type = N'COLUMN', @level2name = N'SumFee';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'预约挂号订单号:如果退费类型为0，必填', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'RefundInfo', @level2type = N'COLUMN', @level2name = N'OrderId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'就诊流水号:如果退费类型为1，必填', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'RefundInfo', @level2type = N'COLUMN', @level2name = N'ClinicNo';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'创建时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'RefundInfo', @level2type = N'COLUMN', @level2name = N'CreateTime';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'是否已处理，1：已处理，0：未处理', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'RefundInfo', @level2type = N'COLUMN', @level2name = N'IsProcessed';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'处理时间', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'RefundInfo', @level2type = N'COLUMN', @level2name = N'ProcessTime';

